Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: extend catalog in cientos #26

Merged
merged 9 commits into from
Dec 8, 2022

Conversation

alvarosabu
Copy link
Member

@alvarosabu alvarosabu commented Dec 6, 2022

This PR fixes #25

Ok, this one has been crazy. I managed to solve all the issues with different Scene and catalog when extending from cientos,
using provide inject was the key since composable where duplicating instances (core had a catalog with uuid 'a' and cientos catalog uuid 'b' ) 🤪

Now is working, I also add the possibility to render slots in cientos, which means if you create for example a wrapper for TextGeometry in cientos, you could pass the material from the main app like this

<script lang="ts" setup>
import { Text3D } from '@tresjs/cientos';

</script>
 <TresScene>
    <Text3D :text="'Awiwi" :font="font">
      <TresMeshNormalMaterial />
    </Text3D>
 </TresScene>

@wheatjs wdyt?

@alvarosabu alvarosabu changed the title Feature/25 extend catalog in cientos feat: extend catalog in cientos Dec 7, 2022
@wheatjs
Copy link
Collaborator

wheatjs commented Dec 8, 2022

Hmm this is probably okay for now, but in the future we should further investigate it so we can stay away from using the window object

@alvarosabu
Copy link
Member Author

Hmm this is probably okay for now, but in the future we should further investigate it so we can stay away from using the window object

I actually manage to use getCurrentInstance

@alvarosabu alvarosabu merged commit 254bbc3 into main Dec 8, 2022
@alvarosabu alvarosabu deleted the feature/25-extend-catalog-in-cientos branch December 19, 2022 16:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Extend catalog in cientos
2 participants